home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / pgs3df.lha / 3.0fupdate / help.lha / Demo / Display.rexx next >
OS/2 REXX Batch file  |  1995-02-06  |  1KB  |  40 lines

  1. /* DISPLAY.REXX */
  2. /* $VER: AmigaGuide Picture Displayer 1.0e */
  3. /* Copyright 1995 Soft-Logik Publishing Corporation */
  4. /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  5.  
  6. /* Purpose: AmigaGuide v34 cannot display a picture. Multiview in v39
  7.    can display pictures or text, but not both. Need a way so that when
  8.    the user chooses to view a picture in an AmigaGuide file to have either
  9.    WDisplay (v34) or Multiview (v39) display the picture. This script will
  10.    check the OS version and use the appropriate utility. Designed to be
  11.    run from an AmigaGuide link. */
  12.  
  13. arg PictureName .
  14.  
  15. options results /* enable results */
  16.  
  17. if show(P, 'PAGESTREAM') then do
  18.     address 'PAGESTREAM'
  19.     getscreenname
  20.     screen=' pubscreen 'result
  21.     end
  22. else screen=''
  23.  
  24. cmd = 'version >t:temp'
  25. address command cmd
  26. if open(.IFile,'t:temp','R') then do
  27.     line = readln(.IFile)
  28.     ksver = strip(word(line,words(line)/2),t,' ,')   /* get kickstart version */
  29.     if (ksver>='39') then name='sys:utilities/multiview 'PictureName||screen
  30.         else name='sys:utilities/wdisplay 'PictureName||screen
  31. end
  32.  
  33. /* Display Picture File */
  34. address command name
  35.  
  36. /* Cleanup */
  37. call close(.IFile)
  38. address command 'delete t:temp quiet'
  39. EXIT
  40.